export const ProcessDate = {
  data() {
    return {
      queryParam: {
        createTime_start: null,
        endTime_end: null
      },
      endOpen: false
    }
  },
  methods: {
    disabledStartDate(startValue) {
      const endValue = this.queryParam.endTime_end;
      if (!startValue || !endValue) {
        return false;
      }
      return startValue.valueOf() > endValue.valueOf();
    },
    disabledEndDate(endValue) {
      const startValue = this.queryParam.createTime_start;
      if (!endValue || !startValue) {
        return false;
      }
      return startValue.valueOf() >= endValue.valueOf();
    },
    handleStartOpenChange(open) {
      if (!open) {
        this.endOpen = true;
      }
    },
    handleEndOpenChange(open) {
      this.endOpen = open;
    }
  }
}
